package com.qfedu.yanglao20app.adhibition.controller;

import com.qfedu.yanglao20.common.CommonResult;
import com.qfedu.yanglao20.entity.adhibition.Adhibition;
import com.qfedu.yanglao20app.adhibition.service.AdhibitionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * User:  yunk
 * Date 2023/5/16  20:35
 */


@Api(tags = "快捷服务")
@RestController
@RequestMapping("app/adhibition")
public class AdhibitionController {
    @Resource
    private AdhibitionService adhibitionService;

    @ApiOperation(value = "更多")
    @GetMapping("select/All")
    public CommonResult<List<Adhibition>> selectAll() {

        return CommonResult.success(adhibitionService.selectAll());
    }

    @ApiOperation(value = "根据id查看详情")
    @GetMapping("selectById")
    public CommonResult<Adhibition> selectById(Integer id) {

        return CommonResult.success(adhibitionService.selectById(id));
    }
}
